<html>
    <head>
        <link rel="stylesheet" type="text/css" href="../public/css/style.css">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <style type="text/css">
            #add table{  margin:auto; display:block}
        </style>
    </head>
    <body>
<div id=" wraper">
<?php $this->load->view('admin/menu',array('action' => $action))?>
<div id="content">
<?php echo validation_errors() ?>
<?php echo form_open('admin/control_operation_works'); ?>
    <div id="add">
        <table border="0" width="80%" style="display: block;">
        <tr>
            <td></td>
            <td vlaign="middle">
            <h2>Edit Work</h2>
            </td>
        </tr>
        <?php  foreach ($works as $item): ?>
        <tr>
            <td class="title">Name: </td>
            <td>
                <input type="text" name="name" value="<?php echo $item["name"];?>">
                <input type="hidden" name="id_works" value="<?php echo $_GET['id'];?>">
            </td>
        </tr>
        <tr>
            <td class="title">overview:</td>
            <td><textarea name="overview" cols="5"><?php echo $item["overview"];?></textarea></td>
        </tr>
        <tr>
            <td class="title">description:</td>
            <td><textarea name="description" cols="5"><?php echo $item["description"];?></textarea></td>
        </tr>
        <tr>
            <td class="title">requirements</td>
            <td><textarea name="requirements" cols="5"><?php echo $item["requirements"];?></textarea></td>
        </tr>
        <tr>
            <td class="title">id_categories</td>
            <td><input type="text" name="id_categories" value="<?php echo $item["id_categories"];?>"></td>
        </tr>
         <tr>
            <td class="title">Location: </td>
            <td><input type="text" name="location" value="<?php echo $item["location"];?>"></td>
        </tr>
        <tr>
            <td class="title">id_categories</td>
            <td>
                <select id="id_site">
                    <option value="<?php echo $item['id_site']?>"> <?php echo $item['id_site']?> </option>
                    
                </select>
            </td>
        </tr>
        
        <tr>
            <td></td>
            <td><input type="submit" name="submit_edit" value="Edit words"></td>
        </tr>
        <?php endforeach; ?>
    </table>
    </div><!-- End #add -->
</form>

</div><!--End: #content-->
</div><!-- End #wraper -->
    </body>
</html>